from masonite.controllers import Controller
from masonite.views import View
from app.traits.MyControllerTrait import MyControllerTrait


class HomeController(Controller):
    uri = "/admin/home"
    temp = "admin.home"

    def index(self, view: View):
        data = {
            'title': "首页",
            'menus': MyControllerTrait.get_menu_nav(''),
        }
        return view.render(self.temp + ".index", data)
